<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@taglib uri="http://www.bird.com" prefix="bird"%>
<%
String path = request.getContextPath();
%>
<%@page language="java" import="java.util.List"%>
<%@page language="java" import="com.machine.bean.Tree"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<bird:getTree/>
  <head>
   <link rel="stylesheet" href="/Machine/css/dtree.css" type="text/css"></link>
   <script type="text/javascript" src="/Machine/js/dtree.js"></script>
    <title>My JSP 'MyJsp.jsp' starting page</title>
	
  </head>
  <body>
	<div class="dtree">
  	
  		<script type="text/javascript">
  			
  			d = new dTree('d');
			d.add(0,-1,'');
			<%
				@SuppressWarnings("unchecked")
				List<Tree> list = (List<Tree>)request.getAttribute("tree");
				for(int i = 0; i < list.size(); i++){
					Tree bean = (Tree)list.get(i);
			%>
			d.add(<%=bean.getId()%>,<%=bean.getParentid()%>,'<%=bean.getName()%>',
			'<%=bean.getUrl()%>','','<%=bean.getTarget()%>');
			<%
				}
			%>
			document.write(d);
  		</script>
  </div>
  </body>
</html>
